<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--sweetalert2-->
    <link href="../dist/sweetalert2.min.css" rel="stylesheet">
    <script src="../dist/sweetalert2.min.js" type="text/javascript"></script>
</head>
<body>

<script>
    Swal.fire({
        title: 'Are you sure?',
        text: "You won't be able to revert this!",
        icon: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#3085d6',
        cancelButtonColor: '#d33',
        confirmButtonText: 'Yes, delete it!'
    }).then((result) => {

        //弹窗对象
        console.log(result)

        if (result.isConfirmed) {
            Swal.fire(
                'Deleted!',
                'Your file has been deleted.',
                'success'
            )
        }

        return '111'
    }).then(function (data){
        console.log(data)
    })
</script>

</body>
</html>